package com.example.zhunongzonghe.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;


@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("zn_exchange_comment")
public class ZnExchangeComment implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 交流中心：评论表
     */
    @TableId(value = "comment_id", type = IdType.AUTO)
    private Integer commentId;

    /**
     * 根评论id
     */
    @TableField("root_id")
    private Integer rootId;

    /**
     * 评论内容
     */
    @TableField("comment_content")
    private String commentContent;

    /**
     * 所属帖子
     */
    @TableField("post_id")
    private Integer postId;

    /**
     * 评论人
     */
    @TableField("user_id")
    private Integer userId;
    /**
     * 回复目标的评论id
     */
    @TableField("to_comment_id")
    private Integer toCommentId;
    /**
     * 回复目标的用户id
     */
    @TableField("to_comment_userid")
    private Integer toCommentUserid;
    /**
     * 评论时间
     */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime;

}
